-- GENERATED SPELL FOR [Glacial Templar] --


function spell0_26216(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(14907,pUnit)
pUnit:RegisterEvent('Sorts_26216', 8264, 1)
end

function spell1_26216(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(15089,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26216', 8321, 1)
end

function spell2_26216(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(5164,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26216', 2000, 1)
end

function Sorts_26216(pUnit, Event)
local choix_sorts_26216 = math.random(0, 2)
if choix_sorts_26216 == 0 then
pUnit:RegisterEvent('spell0_26216', 1, 1)
end
if choix_sorts_26216 == 1 then
pUnit:RegisterEvent('spell1_26216', 1, 1)
end
if choix_sorts_26216 == 2 then
pUnit:RegisterEvent('spell2_26216', 1, 1)
end
end

function mob26216_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26216', math.random(1500, 3000), 1)
end

function mob26216_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26216_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26216_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26216, 1, 'mob26216_Action')
RegisterUnitEvent(26216, 2, 'mob26216_Leave')
RegisterUnitEvent(26216, 3, 'mob26216_Kill')
RegisterUnitEvent(26216, 4, 'mob26216_Die')
